<div id="mws-container" class="clearfix">
  <div class="container">
    <div class="mws-panel grid_8">
      <div class="mws-panel-header"> <span class="mws-i-24 i-table-1">Product Reviews-Management</span> 
      </div>
      <div class="mws-panel-body">
        <div class="dataTables_wrapper">
          <table class="mws-datatable-fn mws-table">
            <thead>
              <tr>
                <th width="141" colspan="1" rowspan="1" class="sorting_asc" style="width: 141px;">Title</th>
                <th width="337" colspan="1" rowspan="1" class="sorting" style="width: 230px;">Review</th>
                 <th width="100" colspan="1" rowspan="1" class="sorting" style="width:100px;">User</th>
                <th width="150" colspan="1" rowspan="1" class="sorting" style="width: 100px;">Status</th>
                <th width="91" colspan="1" rowspan="1" class="sorting" style="width: 91px;">Actions</th>
              </tr>
            </thead>
            <?php if(isset($ProductReviews) and ($ProductReviews)):?>
            <tbody>
            <?php  $x =0;
			foreach($ProductReviews as $ProductReview){
				if($x%2==0)
					{
						$class ="odd";
					}
				else
					{
						$class ="even"; 
					}
				?>
              <tr class="gradeA <?php echo $class ; ?>">
                <td class=" sorting_1"><?php echo $ProductReview['ProductReview']['title']; ?></td>
                  <td class=" sorting_1"><?php echo $ProductReview['ProductReview']['review']; ?></td>
                     <td class=" sorting_1">
                     <?php echo $ProductReview['ProductReview']['user']['name']; ?>
                    </td>
                <td class="center">
					<?php
                     if(isset($ProductReview['ProductReview']['status']) and ($ProductReview['ProductReview']['status']==1))
						 {
								echo $html->link('Active',
								array('controller'=>'Setups', 'action' => 'admin_update_status',
								'ProductReview',$ProductReview['ProductReview']['id'], 0,'admin_product_reviews'),
								array('escape' => false,'id'=>'alink'));
						 }
					 else
						 {
								echo $html->link('Deactive',
								array('controller'=>'Setups', 'action' => 'admin_update_status',
								'ProductReview',$ProductReview['ProductReview']['id'], 1,'admin_product_reviews'),
								array('escape' => false,'id'=>'alink'));
						 } 
					?>
                 </td>
                <td class="center">
					<?php
						echo $html->link('Delete',
						array('controller'=>'Setups', 'action' => 'admin_delete_by_id',
						'ProductReview',$ProductReview['ProductReview']['id'],'admin_product_reviews'),
						array('escape' => false,'id'=>'alink'), 'Are you sure?');
                    ?>
                </td>
              </tr>
              <?php $x++;} ?>
            </tbody>
            <?php endif; ?>
          </table>
          <div class="dataTables_info"></div>
          <div class="dataTables_paginate paging_full_numbers">
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
